package rpc.register;

import java.util.HashMap;
import java.util.Map;

/**
 * 本地注册
 */
public class MyLocalRegister {
    /**
     * 接口实现类Map
     */
    private static final Map<String, Class<?>> interfaceImplMap = new HashMap<>();

    /**
     * 本地注册
     */
    public static void register(String interfaceName, Class<?> interfaceImplClass) {
        interfaceImplMap.put(interfaceName, interfaceImplClass);
    }

    public static Class<?> get(String interfaceName) {
        return interfaceImplMap.get(interfaceName);
    }
}
